/**
 * 
 */
package edu.pku.sei.modeler.figures;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Color;

import edu.pku.notation.runtime.draw2d.CircleFigure;

/**
 * @author YanYan
 *
 */
public class InitialPseudostateFigure extends CommonFigure {

	public static final org.eclipse.swt.graphics.Color INITIALNODE_COLOR = new Color(null,175,178,239);
	public IFigure root = null;
	
	private IFigure toolTip;
	
	public InitialPseudostateFigure(){
		super();
		XYLayout xyL = new XYLayout();
		setLayoutManager(xyL);
		setOpaque(true);
		
		root =  new CircleFigure();
		root.setOpaque(false);
		root.setBackgroundColor(ColorConstants.buttonDarkest);
//		root.setForegroundColor(ColorConstants.buttonLightest);
		add(root);
		
		toolTip = new Label("Initial");
		setToolTip(toolTip);
		
	}
	
	public void setBounds(Rectangle rect) {
		super.setBounds(rect);
		if (root != null)
			root.setSize(rect.width, rect.height);
	}
	protected void paintShadow(Graphics g) {
		// TODO: draw the figure's own shadow here
	}
}
